package org.akomantoso.core.io.util.group;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.akomantoso.core.data.Ol;
import org.akomantoso.core.data.P;
import org.akomantoso.core.data.group.HTMLBlock;
import org.akomantoso.core.io.util.Instantiator;

/**
 * @author <a href="mailto:jacques.militello@gmail.com">Jacques Militello</a>
 */
public final class HTMLBlockGroup {

	private HTMLBlockGroup() {
	}

	public static final Map<String, Instantiator<HTMLBlock>> MAP;

	static {

		Map<String, Instantiator<HTMLBlock>> temp = new HashMap<String, Instantiator<HTMLBlock>>();

		// p
		temp.put(P.ELEMENT.intern(), new Instantiator<HTMLBlock>() {
			public P instantiate() {
				return new P();
			}
		});

		// ol
		temp.put(Ol.ELEMENT.intern(), new Instantiator<HTMLBlock>() {
			public Ol instantiate() {
				return new Ol();
			}
		});

		MAP = Collections.unmodifiableMap(temp);
	}

}
